package com.sky.mapper;



import com.sky.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.math.BigInteger;
import java.util.Map;

@Mapper
public interface UserMapper  {

    //根据openid来获取用户
    @Select("select * from user where openid = #{openid}")
    User getUserByOpenid(String openid);

/// ////////////////
    int insert(User registerUser);

    User getById(Long userId);

    @Select("select count(*) from user")
    BigInteger countAll();

    BigInteger countAllByTime(Map map);


    Integer countByMap(Map map);
}
